package net.csdra.libraryborrowing.service;

import net.csdra.libraryborrowing.domain.Address;
import net.csdra.libraryborrowing.domain.AddressRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by xiaomi on 2017/10/17.
 */
@Service
public class AddressServiceImpl implements AddressService {

    @Autowired
    AddressRepository addressRepository;

    @Override
    public List<Address> getAddressList(GetAddressList getAddressList) {
        List<Address> addressList = addressRepository.findByMetaId(getAddressList.getMetaId());
        return addressList;
    }
}
